<?php

namespace console\models;

/**
 * This is the model class for table "{{%base_dist}}".
 *
 * @property int $id
 * @property string $name
 * @property string $code
 * @property string $abbr
 * @property int $level
 * @property int $parent_id
 */
class BaseDist extends \common\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%base_district}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['code'], 'required'],
            [['level', 'parent_id'], 'integer'],
            [['name'], 'string', 'max' => 50],
            [['code'], 'string', 'max' => 6],
            [['abbr'], 'string', 'max' => 20],
        ];
    }

}
